package zero.tech.core.util;

import java.util.Random;

public class RandomUtil {

	private static Random random = new Random();
	public static int randInt(int length) {
		return random.nextInt(length);
	}
	public static int randInt(int x1,int x2) {
		int temp = 0;
		if(x1>x2){
			temp = x1;
			x1 = x2;
			x2 = temp;
		}
		int rand = random.nextInt(x2-x1);
		return rand+x1;
	}
	public static String randNum(int count) {
		int first = randInt(1, 10);
		String num = ""+first;
		for(int i=1;i<count;i++){
			num+=randInt(0, 10);
		}
		return num;
	}
}
